feat(nautobotop): Add VLAN, Prefix, RIR, Role, and Tenancy sync support#1893
Merged
abhimanyu003 merged 5 commits intomainfrom Apr 1, 2026
Merged
feat(nautobotop): Add VLAN, Prefix, RIR, Role, and Tenancy sync support#1893abhimanyu003 merged 5 commits intomainfrom
abhimanyu003 merged 5 commits intomainfrom
Conversation
abhimanyu003
commented
Mar 30, 2026
| if authToken != "" { | ||
| config.AddDefaultHeader("Authorization", fmt.Sprintf("Token %s", authToken)) | ||
| } | ||
| config.AddDefaultHeader("Authorization", fmt.Sprintf("Token %s", authToken)) |
Contributor
Author
There was a problem hiding this comment.
Always adding auth token here
abhimanyu003
commented
Mar 30, 2026
Comment on lines
+38
to
+45
| reqClient := req.C(). | ||
| SetTimeout(30*time.Second). | ||
| SetCommonRetryCount(3). | ||
| SetCommonRetryBackoffInterval(1*time.Second, 5*time.Second). | ||
| SetCommonRetryCondition(func(resp *req.Response, err error) bool { | ||
| return err != nil || resp.StatusCode >= 500 | ||
| }) | ||
|
|
Contributor
Author
There was a problem hiding this comment.
Using req/cool http library, to handle HTTP API failure from nautobot API if any.
It will retry with back-off, it also supports long wait time.
These settings can be tweaked, but this look good default.
Contributor
There was a problem hiding this comment.
That works. If need be we can have a config file.
cardoe
approved these changes
Mar 31, 2026
Contributor
cardoe
left a comment
There was a problem hiding this comment.
Tentatively approving but not sure of your comments.
We really need to get some documentation of the files and the data being loaded.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
This PR adds sync support for several new resource types.
imroc/reqHTTP-Client with built-in retry and backoff to handle any API failureNew syncs added:
The Nautobot API client was updated to use
Let me check if there are existing sample files for the other resource types too.
Now let me also check the models for VRF and Tag to show their structure:
Here are the sample YAMLs for all resource types:
VLAN:
Prefix:
RIR:
Role:
Tenant Group:
Tenant:
Testing: Its done locally and found no-error on multiple reconcile loop, as well as no error on fresh nautobot setup using helm